package com.herench.bunch.lab.convert;

import com.herench.bunch.commons.support.WsClientFactory;
import org.apache.cxf.endpoint.Client;
import org.junit.Test;

import java.net.URLDecoder;

/**
 * Created by user on 2018/11/20.
 */
public class test {
    @Test
    public void test1() throws Exception{
        String message="MSH%7C%5E%7E%5C%26%7CLIS%7C%7C%7C%7C20181120214958.759%2B0800%7C%7CQRY_Q01%5EQ01%5EQRY_Q01%7Cb0db3f3bac0b47eabb3a59d40e18d01b%7C300030%5Ed71ffb73783540459ad1e333fcfec112%7C2.4%0DQRD%7C%7C%7C%7C%7C%7C%7C%7C%7CtestNo%5EZ100610000001A%7EresultStatus%5E2%7Ereporter%5E1503%7EverifiedBy%5E1503%0D\n";
        String url = "http://localhost:8020/webservice/labWebservice?wsdl";
        Client client = WsClientFactory.getInstance().getWsClient(url);
        Object[] res = client.invoke("send", message);
        System.out.println(URLDecoder.decode((String) res[0],"UTF-8"));
    }
}
